#pragma once

#include <QWidget>
#include <QPushButton>

class TabBarWidget : public QWidget
{
	Q_OBJECT

public:
	TabBarWidget(QWidget *parent);

	void addTab(QString text);
	void updateTabStyle();

	int currentIndex();
	void setCurrentIndex(int index);

signals:
	void currentIndexChanged(int);

protected slots:	
	void onBtnClicked();

protected:
	void paintEvent(QPaintEvent *event);

	QVector<QPushButton*> m_btnList;
	int m_index;
};